<template>
    <div class="common-card">
      <div class="title">{{title}}</div>
      <div class="value">{{value}}</div>
      <div class="chart">
        <slot></slot>
      </div>
      <div class="line"></div>
      <div class="total">
        <slot name="footer"></slot>
      </div>
    </div>
</template>

<script>
export default {
  name: 'CommonCard',
  props: {
    title: String,
    value: [String, Number]
  }
}
</script>

<style scoped lang="scss">
  .title{
    font-size: 12px;
    color: #999999;
  }
  .value{
    font-size: 25px;
    color: #000;
    margin-top: 5px;
    letter-spacing: 1px;
  }
  .chart{
    height: 55px;
  }
  .line{
    margin: 10px 0;
    border-top: 1px solid #eee;
  }
  .total{
    font-size: 12px;
    color: #666;
  }
</style>
<style>
  .emphasis{
    color: #000;
    margin-left: 10px;
    font-weight: 700;
  }
  .increased{
    width: 0;
    height: 0;
    border-width: 4px;
    border-color: transparent transparent red transparent;
    border-style: solid;
    margin: 0 0 3px 5px;
  }
  .descreased{
    width: 0;
    height: 0;
    border-width: 4px;
    border-color: green transparent transparent transparent;
    border-style: solid;
    margin: 6px 0 0 5px;
  }
</style>
